﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Engine;
using Engine.Attributes;

namespace Engine.Components.Arithmetic
{
	/// <summary>
	/// Source that produces an integer constant.
	/// </summary>
	public class IntegerConstantSource: UserCodedComponent
	{
        public readonly OutPort<int> Output = new OutPort<int>();

		[Config(Description = "a constant returned by the OutPort")]
		public int Value 
        {
            get
            {
                return Output.Value;
            }

            set
            {
                Output.Value = value;
            }
        }

        public IntegerConstantSource()
        {
            this.Value = 0;
        }
	}
}
